<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/double-date.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/page.css" rel="stylesheet">
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/admin/js/double-date.js"></script>
    <script src="__PUBLIC__/admin/js/jquery-ui-1.10.4.custom.min.js"></script>
</head>

<script>
    var url = "/{$Request.module}/assemble";
    var deleteUrl = "{:url('assemble/delete')}";
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content" id="server">
    <style>
        .qiehuan{
            width:120px; height:40px; line-height:40px; font-size:14px; font-weight:bold; color:#333; background-color:#F5F5F6; float:left; margin-right:10px; text-align:center; cursor:pointer;
        }
    </style>
<!--    <div class="row">-->
<!--        <div class="col-sm-12">-->
<!--            <div class="ibox float-e-margins">-->
<!--                <div class="ibox-title">-->
<!--                    <h5>拼团活动列表</h5>-->
<!--                </div>-->
<!--                <div class="ibox-content">-->
<!--                    <div class="row">-->
<!--                        <div class="col-sm-5 m-b-xs">-->
<!--                            <div style="width:1300px; height:40px; margin-bottom:25px;">-->
<!--                                <a href="{:url('assemble/lst',array('filter'=>10))}"><div class="qiehuan" {if condition="$filter && $filter eq 10"}style="background-color: #1992FC;color: #FFF;"{/if}>全部</div></a>-->
<!--                            <a href="{:url('assemble/lst',array('filter'=>1))}"><div class="qiehuan" {if condition="$filter && $filter eq 1"}style="background-color: #1992FC;color: #FFF;"{/if}>待审核</div></a>-->
<!--                        <a href="{:url('assemble/lst',array('filter'=>2))}"><div class="qiehuan" {if condition="$filter && $filter eq 2"}style="background-color: #1992FC;color: #FFF;"{/if}>即将开始</div></a>-->
<!--                    <a href="{:url('assemble/lst',array('filter'=>3))}"><div class="qiehuan" {if condition="$filter && $filter eq 3"}style="background-color: #1992FC;color: #FFF;"{/if}>抢购中</div></a>-->
<!--                <a href="{:url('assemble/lst',array('filter'=>4))}"><div class="qiehuan" {if condition="$filter && $filter eq 4"}style="background-color: #1992FC;color: #FFF;"{/if}>已结束</div></a>-->
<!--            <a href="{:url('assemble/lst',array('filter'=>5))}"><div class="qiehuan" {if condition="$filter && $filter eq 5"}style="background-color: #1992FC;color: #FFF;"{/if}>平台关闭</div></a>-->
<!--    </div>-->
<!--</div>-->
<!--</div>-->

<!--<div class="row">-->
<!--    <div class="col-sm-2 m-b-xs">-->
<!--        <a href="{:url('assemble/add')}"><button type="button" class="btn btn-sm btn-primary" id="add" style="margin-right:15px;"><i class="fa fa-plus" style="color:#FFF;"></i>&nbsp;新增拼团活动</button></a>-->
<!--    </div>-->

<!--    <div class="col-sm-10 m-b-xs" style="float:right;">-->
<!--        <form action="{:url('assemble/search')}" method="post" id="form_search" style="margin-top:10px;">-->

<!--            <div class="col-sm-4" style="float:right;">-->
<!--                <div class="input-group">-->
<!--                    <input type="text" name="keyword" placeholder="请输入活动标题" {if condition="(isset($keyword)) AND ($keyword)"}value="{$keyword}"{/if} class="input-sm form-control" />-->
<!--                    <span class="input-group-btn"><button type="submit" class="btn btn-sm btn-primary">搜索</button></span>-->
<!--                </div>-->
<!--            </div>-->

<!--            <div style="float:right; font-size:15px; margin-right:10px;">-->
<!--                <select style="height:30px; line-height:30px; border:1px solid #e5e6e7;" name="recommend">-->
<!--                    <option value="0" {if condition="(isset($recommend)) AND ($recommend eq 0)"}selected="selected"{/if}>全部</option>-->
<!--                    <option value="1" {if condition="(isset($recommend)) AND ($recommend eq 1)"}selected="selected"{/if}>推荐</option>-->
<!--                    <option value="2" {if condition="(isset($recommend)) AND ($recommend eq 2)"}selected="selected"{/if}>未推荐</option>-->
<!--                </select>-->
<!--            </div>-->

<!--            <div style="float:right; font-size:15px; margin-right:10px;">-->
<!--                <select style="height:30px; line-height:30px; border:1px solid #e5e6e7;" name="checked">-->
<!--                    <option value="0" {if condition="(isset($checked)) AND ($checked eq 0)"}selected="selected"{/if}>全部</option>-->
<!--                    <option value="1" {if condition="(isset($checked)) AND ($checked eq 1)"}selected="selected"{/if}>待平台审核</option>-->
<!--                    <option value="2" {if condition="(isset($checked)) AND ($checked eq 2)"}selected="selected"{/if}>即将开始</option>-->
<!--                    <option value="3" {if condition="(isset($checked)) AND ($checked eq 3)"}selected="selected"{/if}>抢购中</option>-->
<!--                    <option value="4" {if condition="(isset($checked)) AND ($checked eq 4)"}selected="selected"{/if}>已结束</option>-->
<!--                    <option value="5" {if condition="(isset($checked)) AND ($checked eq 5)"}selected="selected"{/if}>平台关闭</option>-->
<!--                </select>-->
<!--            </div>-->

<!--            <div class="date fr" id="to" style="float:right; font-size:15px; margin-right:10px;">-->
<!--                <input type="text" name="endtime" readonly="readonly" placeholder="结束时间" {if condition="(isset($endtime)) AND ($endtime)"}value="{:date('Y-m-d',$endtime)}"{/if} class="date-check">-->
<!--            </div>-->

<!--            <div class="date date1 fl" id="from" style="float:right; font-size:15px; margin-right:10px;">-->
<!--                <input type="text" name="starttime" readonly="readonly" placeholder="开始时间" {if condition="(isset($starttime)) AND ($starttime)"}value="{:date('Y-m-d',$starttime)}"{/if} class="date-check">-->
<!--            </div>-->

<!--        </form>-->
<!--    </div>-->
<!--</div>-->



<div id="ajaxpagetest">
    <script>
        var pnum = {$pnum};
        {if condition="(isset($filter)) AND ($filter)"}
        var filter = {$filter};
        {/if}
            {if condition="(!isset($search)) OR (!$search)"}
            var search = 0;
            var goUrl = "/{$Request.module}/assemble/lst/filter/"+filter+".html?page="+pnum;
            {else/}
                var search = {$search};
                var goUrl = "/{$Request.module}/assemble/search.html?page="+pnum;
                {/if}
    </script>


    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th style="width:5%">ID</th>
            <th style="width:10%">用户名称</th>
            <th style="width:10%">用户头像</th>
            <th style="width:10%">订单编号</th>
            <th style="width:10%">金额</th>
            <th style="width:10%">订单状态</th>
        </tr>
        </thead>
        <tbody>
        {if condition="!empty($list)"}
        {foreach name="list" item="v"}
        <tr>
            <td>{$v.id}</td>
            <td>{if condition="$v['pin_type'] eq 1"} <span style="color: red;border: 1px solid red;">团长</span>{else}<span style="color: pink;border: 1px solid pink;">成员</span>{/if}{$v.user_name}</td>
            <td><img src="{$v.headimgurl}" class="pop_goods_thumb" onerror="this.src='__PUBLIC__/admin/img/nopic.jpg'"/></td>
            <td>{$v.ordernumber}</td>
            <td>{$v.total_price}</td>
            <td>
                {if condition="$v['zhuangtai'] eq 1"}
                <span style="color:#1c84c6;">未支付</span>
                {elseif condition="$v['zhuangtai'] eq 2"/}
                <span style="color:#1c84c6;">已取消</span>
                {elseif condition="$v['zhuangtai'] eq 3"/}
                <span style="color:#ed5565;">申请退款</span>
                {elseif condition="$v['zhuangtai'] eq 4"/}
                <span style="color:#ed5565;">完成退款</span>
                {elseif condition="$v['zhuangtai'] eq 5"/}
                <span style="color:#ed5565;">待发货</span>
                {elseif condition="$v['zhuangtai'] eq 6"/}
                <span style="color:#ed5565;">已发货</span>
                {elseif condition="$v['zhuangtai'] eq 7"/}
                <span style="color:#ed5565;">已完成</span>
                {/if}
            </td>
        </tr>
        {/foreach}
        {else/}
        <tr><td colspan="9" style="text-align:center; font-size:14px;">没有找到相关数据</td></tr>
        {/if}
        </tbody>
    </table>
    <div class="row"><div class="pagination" style="float:right; margin-right:20px;">{$page}</div></div>
</div>

</div>
</div>
</div>

</div>
</div>

<!-- 全局js -->
<script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
<script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/admin/js/plugins/validate/jquery.validate.min.js"></script>
<!-- iCheck -->
<script src="__PUBLIC__/admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/admin/js/common/admin.js"></script>
<script src="__PUBLIC__/admin/js/common/ajax.js"></script>

<script>

    //手动结束
    function finishStatus(id) {
        $.ajax({
            url:"{:url('Assemble/finishStatus')}",
            type:'POST',
            data:{id: id,status: status},
            dataType:'json',
            success:function(data) {
                if (!data.status) {
                    layer.msg(data.mess, {icon: 2,time: 2000});
                } else {
                    location.reload();
                }
            }
        });
    }
    function group_info(id,obj){
        var infoUrl = url+'/info/id/'+id;
        location.href = infoUrl;
    }
</script>
</body>
</html>